/**
 * 
 */
package com.jushu.storbox.util.image;

/**
 * Image deal class
 */
public class ImageUtils {

	/**
	 * @param fileName
	 * @return
	 */
	public static boolean isImageType(String fileName) {
		if (fileName == null || fileName.trim().toString().equals("") || fileName.indexOf(".") == -1) {
			return false;
		}
		String end = fileName.substring(fileName.lastIndexOf(".") + 1,
				fileName.length()).toLowerCase();
		if (end.equals("jpg") || end.equals("gif") || end.equals("png")
				|| end.equals("jpeg") || end.equals("bmp")) {
			return true;
		}
		return false;
	}
	
}
